function check(cc)
{
	var count=document.getElementById("pCount");
	if(count.value<=0)
		{
		alert("invalid count!");
		event.returnValue=false;
		}
	if(count.value>cc)
		{
		alert("Not enough product!");
		event.returnValue=false;
		}
}

function onlyNum()
{
	if(!((event.keyCode>=48&&event.keyCode<=57)||(event.keyCode>=96&&event.keyCode<=105))&&event.keyCode!=8)
	{
		event.returnValue=false;
		
	}
}

function hoverStar(id){
	//alert("ss");
	for(var i = 0 ; i < 5 ; i++){
		var star = document.getElementById("m" + i);
		if(i <= id){
			star.innerHTML = "<img src='../image/item_start.png'>";
		}else{
			star.innerHTML = "<img src='../image/item_start_none.png'>";
		}
	}
}

function outStar(){
	for(var i = 0 ; i < 5 ; i++){
		var star = document.getElementById("m" + i);
		star.innerHTML = "<img src='../image/item_start_none.png'>";
	}
}

function setMark(id){
	//alert("ss");
	for(var i = 0 ; i < 5 ; i++){
		var star = document.getElementById("m" + i);
		if(i <= id){
			star.innerHTML = "<img src='../image/item_start.png'>";
		}else{
			star.innerHTML = "<img src='../image/item_start_none.png'>";
		}
	}
	var hidden=document.getElementById("id_star");
	hidden.value=id+1;
	//alert(hidden.value);
	//alert(id);
}

function checkMessage()
{
	var message=document.getElementById("message_board");
	if(message.value=="")
		{
		event.returnValue=false;
		}
	else{
		event.returnValue=true;
	}
	}